<?php
class ModelAccountRecharge extends Model {
    public function addRecharge($data){
        $this->db->query("INSERT INTO " . DB_PREFIX . "recharge_order SET customer_id = '" . (int)$this->customer->getId() . "', price = '" . $this->db->escape($data['price']) . "', type = '" . $this->db->escape($data['type']) . "', date=NOW()");

        $recharge_id = $this->db->getLastId();

        return $recharge_id;
    }
    public function confirm($recharge_order_id,$status){
        $this->db->query("UPDATE " . DB_PREFIX . "recharge_order SET status = '" . (int)$status . "' WHERE recharge_order_id=".$recharge_order_id."");
    }

}
?>